Many circuits use PWM techniques for a variety of purposes. In one example, a PWM output provides a signal source for receipt by another device. By varying, for example, the frequency and duty cycle of the PWM signal, control of the other device can be affected. One particular example is in the field of motor control. A PWM signal can be used to drive (through appropriate current-drive circuitry) a motor. By varying the duty cycle of the PWM signal, the amount of energy transferred to the motor is changed. This is useful in regulating motor torque and speed. In another example, the PWM signal is passed through a low-pass filter, thereby producing a filtered analog voltage output that varies as a function of the duty cycle of the PWM signal.
By way of definition and background, a PWM (pulse width modulated) signal is one in which the information is contained in the width of each pulse, typically of a repeating string of pulses. It is considered a form of analog signal in that the information is contained in the time duration of a pulse, which is varied continuously, or in such small steps as to be effectively continuous. That is to be contrasted with a digital signal in which information is contained in discrete steps (such as two steps for binary) and in which values are assigned to the various discrete combinational possibilities.
Generally, a set of digital data stored in registers controls the PWM signal parameters such as, for example, duty cycle and frequency. Thus, to alter the duty cycle of the PWM signal, the data value in the appropriate "duty cycle" register is altered. However, it may be desirable to "trim", or adjust (i.e., lengthen or shorten) the PWM duty cycle without altering the main stored digital duty cycle data value. For example, it may be desirable to trim the duty cycle as a function that is independent of the function which controls the main duty cycle data value.
The present invention is directed toward solutions to the above-identified problem.